<?php
if($product):
$titlePr = 'title'.$rear;
$aliasPr = 'alias'.$rear;
$tygia = $this->common_model->getone('setting',array('id'=>1),array('tygia'));
$tygia = $tygia->tygia;
if(is_numeric($tygia)){}else{$tygia = 21000;}
$currency = $this->session->userdata('currency');
?>
<div class="module-product product-news ">
	<div class="product-title title-pronews">
        <h3><?php echo $this->lang->line('module_new'); ?></h3>
	</div><!-- end news-title -->
	
	<div class="product-content content-pronews clearfix">
		<ul id="scroller">
        <?php 
        foreach($product as $pr){
		 ?>
			<li>
				<img height="121px" width="164px" alt="<?php echo $pr->$titlePr; ?>" src="<?php if(empty($pr->image)){$pr->image='/images/so_001.png';} echo base_url().$pr->image; ?>" />
				<p>ID:<?php echo $pr->code; ?></p>
				<p><a href="<?php echo base_url().$this->lang->line('detail_product_link').$pr->$aliasPr.'.html'; ?>" title="<?php echo $pr->$titlePr; ?>"><?php echo $pr->$titlePr; ?></a></p>
				<p><?php echo $this->lang->line('price') ?>: <span><?php if($currency == 'usd'){$gia = $pr->price;$money = ' USD';}else {$gia = $pr->price*$tygia;$money = ' VND';} echo $gia.$money; ?></span></p>
			</li>
            <?php 
		}?>
		</ul>
	</div><!-- end content-news-->
	
</div><!-- end product-news -->
<?php
endif;
?>
<script type="text/javascript" src="<?php echo base_url();?>skin/js/jquery.simplyscroll.js"></script>
<link rel="stylesheet" href="<?php echo base_url();?>skin/css/jquery.simplyscroll.css" media="all" type="text/css">
<script type="text/javascript">
(function($) {
	$(function() {
		$("#scroller").simplyScroll();
	});
})(jQuery);
</script>